/**
 * @file   1113.cpp
 * @author Shuang Hu <hsmath@ubuntu>
 * @date   Wed May 12 22:38:34 2021
 * 
 * @brief  PAT 1113
 * 
 * 
 */
#include<iostream>
#include<set>
#include<vector>
#include<algorithm>
#include<cmath>
using namespace std;
int main(){
    int N;
    cin>>N;
    vector<int> vec;
    for(int i=0;i<N;i++){
	int d;
	cin>>d;
	vec.push_back(d);
    }
    sort(vec.begin(),vec.end());
    if(N%2==0){
	cout<<"0 ";
	int ptr=N/2;
	int res=0;
	for(int i=ptr;i<vec.size();i++){
	    res=res+vec[i];
	}
	for(int i=0;i<ptr;i++){
	    res=res-vec[i];
	}
	cout<<res<<endl;
    }else{
	cout<<"1 ";
	int ptr=N/2;
	int sum1=0;
	int sum2=0;
	for(int i=ptr;i<vec.size();i++){
	    sum1+=vec[i];
	}
	for(int i=0;i<ptr;i++){
	    sum1-=vec[i];
	}
	sum2=sum1-2*vec[ptr];
	int res=max(abs(sum1),abs(sum2));
	cout<<res<<endl;
    }
}
